Computer and game systems often include display devices which are capable of displaying both alphanumeric data and graphic images. Such display devices typically comprise cathode ray tubes (CRT) or flat-panel displays. Display devices such as these utilize raster graphics, in which an image is specified in terms of an array of component points called pixels (short for "picture elements"). With raster graphics, an overall image or display frame is formed from a set of horizontal scan lines, each made up of individual pixels. The display frame or image is thus simply a matrix of pixels covering the entire screen area. In a CRT display, the entire surface or raster of the CRT tube is scanned sequentially, one line at a time, top to bottom, by varying only the intensity of the electron beam for each pixel on a line. Although flat-panel displays do not use a scanning electron beam, they operate in an analogous manner, including the display of multiple lines of individual pixels.
In popular personal computers, a display frame is specified by a matrix of pixel values having a one-to-one correspondence to the display frame pixel matrix. Each pixel value specifies the color or brightness which is to be displayed by a corresponding display frame pixel. The pixel value matrix is stored in a frame buffer. A frame buffer is simply a portion of computer memory having individual storage locations which are mapped to individual display frame pixels. A typical computer contains hardware to repetitively access the frame buffer and to update a display frame pixel matrix or raster based on the contents of the frame buffer. To compose a display frame, a computer program simply writes specific values to correct locations in the frame buffer, and the hardware automatically converts the values to corresponding colors or brightness levels on the display frame. An image composed in this manner is often referred to as a bit-mapped image.
FIG. 1 shows an example of this type of computer and display system, generally designated by the reference numeral 20. System 20 includes a desktop unit 22 and an external display device such as a CRT 24. CRT 24 includes a display frame 26 comprising a two-dimensional matrix or array of display frame pixels (not individually shown).
Desktop unit 22 includes a CPU or data processor 28, random access frame buffer memory 30, and a display processor 32. These elements communicate with each other through a control and communications bus 33. Both data processor 28 and display processor 32 have access to frame buffer memory 30. To compose an image or display frame, data processor 28 writes appropriate data to locations in frame buffer memory 30 which are mapped to individual display frame pixels. Display processor 32 reads this data and converts it to appropriate signals for driving CRT 24.
Other types of computer systems and devices, including many computer-controlled game devices, include graphic sprite management hardware, which operates somewhat differently than the bit-mapped system described above. A graphic "sprite" is a graphic image which forms a part or region, usually a rectangle, of an overall computer screen or display frame. The display frame is composed of one or more of such sprites. Each sprite has specified horizontal and vertical display frame coordinates relative to the display frame, as well as a specified depth coordinate or Z-level relative to other sprites. This allows the sprite management hardware to layer the various sprites on the display frame.
As an example, FIG. 2 shows two individual sprites, labeled 34 and 36. Sprite 36 is a tree which is to remain stationary in the display frame. Sprite 34 is a car which is to move across the display frame in front of the tree. To display these sprites using sprite management hardware, sprite 34 is given a Z-level of 1 and sprite 36 is given a Z-level of 2. The sprites are also given appropriate horizontal and vertical display frame coordinates. All horizontal and vertical coordinates remain constant except for the horizontal coordinate of car sprite 34, which increases to move the car across the display frame.
FIG. 3 shows a display frame 38 showing both sprites. Car sprite 34 lies in a layer or plane above that of sprite 36. In the portions of display frame 38 where the sprites overlap, the uppermost sprite, car sprite 34, hides the lowermost sprite, tree sprite 36. To make the car appear to pass behind the tree, it would only be necessary to give the car sprite a greater depth coordinate than the tree sprite.
To improve images such as that shown by FIG. 3, sprite management hardware typically allows a sprite to contain "transparent" pixels--pixels which are not meant to obscure underlying sprites. Transparent pixels greatly simplify animation sequences. This is illustrated by FIG. 4, in which car sprite 34 is shown with transparent pixels surrounding the car. With this provision, the car can be moved across the display frame simply by adjusting its horizontal coordinate. The tree remains visible through those portions of car sprite 34 which do not actually form the car. Without the provision for transparent pixels, it would be necessary to copy information from underlying sprites into the sprite containing the moving image. This would have to be done for every change in sprite location.
FIG. 5 shows an example of a computer and display system which utilizes sprite management hardware, generally designated by the reference numeral 40. System 40 includes a desktop unit 42 and an external display device such as a CRT 44. CRT 44 includes a display frame 46 comprising a plurality or matrix of display frame pixels (not individually shown).
Desktop unit 42 includes a CPU or data processor 48, random access sprite memory 50, and a sprite display processor 52. Both data processor 48 and display processor 52 have access to sprite memory 50 through a control bus 53. It is apparent that the arrangement of FIG. 4 is quite similar to the arrangement of FIG. 5. The primary difference is in the way pixel values are stored in memory. In the frame-buffer or bit-mapped system of FIG. 1, a frame buffer corresponding to the entire display frame was stored in memory. In the sprite system of FIG. 5, however, a plurality of individual bit-maps, corresponding to a plurality of sprites, are stored by data processor 48 in sprite memory 50. Specifically, data processor 48 defines a plurality of sprite buffers 54 within sprite memory 50. Each sprite buffer stores a two-dimensional matrix or array of pixel values corresponding to a pixel matrix of an individual sprite. Thus, to compose an image or display frame, data processor 48 writes appropriate data to each sprite buffer 54. Sprite display processor 52 reads from each sprite buffer, individually, and performs the necessary manipulations to drive CRT 44 in such a way that the various sprites are properly positioned and layered within display frame 46, in accordance with their specified horizontal, vertical, and depth coordinates.
Sprite management hardware assumes a great deal of the overhead which would otherwise be required of application programs in managing overlying images. The sprite management system described above also works well for displaying windowed video images such as television images or digitized motion pictures which are received from an external source such as a non-volatile storage medium or a remote database. The successive frames of a moving or video image such as this are simply written to their own sprite buffer, and the sprite management hardware takes care of proper layering of the sprite relative to other sprites. Hardware can be provided to receive, decode, or decompress such images and to write them directly to sprite memory without CPU intervention.
Unfortunately, the hardware-based sprite management features described above are not readily available for use with popular desktop or personal computers such as IBM/PC-compatible personal computers. Rather, software developers use software-based techniques for displaying sprites. One way of doing this is to maintain sprite buffers as shown in FIG. 5, and to combine such sprite buffers using appropriate logic before writing them to a bit-mapped frame buffer such as shown in FIG. 1. This can be simplified by simply writing the individual sprite buffers, sequentially from back to front, to the bit-mapped frame buffer. In this way, uppermost sprites overwrite previously written lowermost sprites. The result is that the sprites appear layered in accordance with their specified depths.
This overwriting scheme might become somewhat unwieldy if it were utilized to display a video sequence in a sprite. This is because the scheme would require re-writing very significant portions of a frame buffer for every new frame from the video sequence. This could become very slow.
Accordingly, there is a need and desire for a system which can display video sequences as sprites without requiring specialized sprite hardware. It would be very desirable if such features could be efficiently provided by operating system software within the constraints of existing or widely-available hardware devices, so that application programs could use such features at a high level without having to be concerned with particular features or limitations of underlying hardware.
The invention described below provides these capabilities. Specifically, it provides a method of composing a bit-mapped display frame and frame buffer from a plurality of graphic sprites, one or more of which is formed by a video sequence, without requiring specialized sprite management hardware. These features are accomplished within the limitations of hardware which can be readily obtained for use with popular computers at reasonable prices.